Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Defining and using queries
There is a
DEFINEstatement for a query just as there is for other Progress objects. This is the general syntax:
The statement gives the query a name and, in turn, names the buffer or buffers that the query uses. In the simplest case, the buffers are database table names. But you can also use other buffers you’ve defined as alternatives to table names or, as you’ll learn later in this chapter, buffers for temporary tables.
If you want to reposition within the result set without using the
GET FIRST,NEXT,PREV, andLASTstatements, you need to define the query asSCROLLING. You’ll learn later in this section how to reposition within the result set of a scrolling query. You must also define a query that is going to be associated with a browse asSCROLLING. There is a slight performance cost to using theSCROLLINGoption, so you should leave it off if you are not using the capabilities it enables.You don’t actually specify the exact data selection statement for the buffers and the tables they represent until you open the query. At that time, you can describe the joins between tables and any other parts of a
WHEREclause that filter the data from the tables. As with otherDEFINEstatements, nothing actually happens when Progress encounters theDEFINE QUERYstatement. No data is retrieved. Progress simply registers the query name and sets up storage and a handle for the query itself as an object.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |